<script language="javascript">
function selectAll()
{
	for(var i=0;i<$('#no_req').val();i++)
	{
		document.getElementById('check'+(i+1)).checked=true;
	}
}
function selectNone()
{
	for(var i=0;i<$('#no_req').val();i++)
	{
		document.getElementById('check'+(i+1)).checked=false;
	}
}
</script>
<?php
	require_once('../includes/user.php');
	$user=new User();
?>
<table width="672" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div class="Innerheading">Academic Requests</div></td>
  </tr>
  <tr>
    <td><div class="InnerDarkbox">
      <table width="119%" height="79" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="379" height="22"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="141" height="22" align="right" valign="middle"> Select Test :</td>
              <td width="129"><select name="test" id="test">
            <option value="0" selected="selected" <?php if(isset($_POST['test'])){if($_POST['test']==0) echo 'selected="selected"';} ?> >All</option>
            <option value="21">Intra College</option>
            <option value="22">Inter College</option>
              </select>              </td>
              <td width="92" align="right" valign="middle">Select Year :</td>
              <td width="164" height="20"><select name="year" id="year">
              <option value="0" <?php if(isset($_POST['year'])){if($_POST['year']==0) echo 'selected="selected"';} ?> >All</option>
            <?php 
			$year_res=$user->query("select * from year_details where visibility=1");
			while($year_row=mysql_fetch_array($year_res))
			{
			?>
<option value="<?php echo $year_row['year_id'];?>" <?php if(isset($_POST['year'])){if($_POST['year']==$year_row['year_id']) echo 'selected="selected"';} ?>><?php echo $year_row['year_name']; ?> Only</option>
            <?php 
			}
			?>
              </select>              </td>
              <td width="72"><span id="acad_loading" style="display:none;"><img src="img/status/loading.gif" /></span></td>
            </tr>
          </table></td>
        </tr>
        <?php ?>
        <tr>
          <td height="19">&nbsp;</td>
        </tr>
        <tr>
          <td height="19"><div id="Just_loading"></div></td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>
<script>
	$('#test').change(function(){
	getExtraResults();
	});
	$('#year').change(function(){
	getExtraResults();
	});
</script>